package com.ruoyi.parttime.domain;

import lombok.Data;

@Data
public class DataStatistics implements Cloneable{
    private static DataStatistics dataStatistics = new DataStatistics();
    private String name;
    private Integer value;

    /**
     * 调用对象创建优化
     *
     * @return
     */
    public static DataStatistics getInstance(){
        try {
            return (DataStatistics) dataStatistics.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return new DataStatistics();
    }
}
